package no.ntnu.fp.client;

import no.ntnu.fp.net.co.NotificationType;


public class Notification {

	private Appointment appointment;
	private int notificationID;
	private NotificationType type;
	
	public Notification(int id, NotificationType type, Appointment appointment) {
		this.notificationID = id;
		this.appointment = appointment;
		this.type = type;
	}
	
	public String toString(){
		switch(type){
			case NOTIFY_ACCEPT_APPOINTMENT: return "Meeting accepted.";
			case NOTIFY_DECLINE_APPOINTMENT: return "Meeting declined.";
			case NOTIFY_DELETED_APPOINTMENT: return "Meeting has been deleted.";
			case NOTIFY_NEW_APPOINTMENT: return "New meeting.";
			default:
			case NOTIFY_INACTIVE: return "Old notification.";
		}
	}
	
	public Appointment getAppointment() {
		return appointment;
	}

	public int getID() {
		return notificationID;
	}

	public NotificationType getType() {
		return type;
	}
			
}
